package com.sdx.console.customer.entity;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sdx.service.ConfigService;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.annotatoin.*;

import com.ibeetl.admin.core.util.ValidateConfig;

import org.beetl.sql.core.TailBean;
import java.math.*;

import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity;

import com.sdx.common.utils.Utils;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/*
*
* gen by Spring Boot2 Admin 2019-01-11
*/
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class CustomerInfo extends BaseEntity{

    //会员id
    @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
    @AssignID

    private String customerId ;

    //所在省份
    private String provinceId ;


    //真实姓名
    private String customerName;

    //会员类型[0-内部员工 1-非内部员工]

    private String customerType ;

    //注册类型 a、微信小程序， b、h5微信，c、手机号（短信码验证），d、手机唯一识别码（app）
    @Dict(type="reg_type")
    private String regType ;

    //appid 微信的appid

    private String appId ;

    //来源id 微信注册时是unionid，手机时是手机号，app是是外部唯一识别码，比如imei

    private String sourceId ;

    //来源子id 微信时时openid

    private String subSourceId ;

    //dict_business表关联,14、公开课，15、圣达信教育，16、志愿填报，17、自主招生，18、艺考生

    private Integer module ;

    //来源渠道 miniprogram、自有微信小程序，h5、自有h5，gaosan、高三网app，h6、高三网h5引流

    private String channel ;

    //会员等级

    private String customerLevel ;

    //绑定手机号

    private String phone ;

    //住址

    private String address ;




    private String wxPicurl ;

    //微信昵称

    private String wxUname ;


    //是否为老师[0-非老师 1-咨询师]

    private Integer isTeacher ;

    //可用标记 1、可用，0、不可用

    private Integer custStatus ;

    //注册时间

    private Date registerTime ;

    //更新人

    private Integer updatedBy ;

    //更新人名称

    private String updatedName ;

    //更新时间

    private Date updatedTime ;

	/**
	 * 对应推广码,promote_record表
	 */
	private String comeFrom;

    /**
     *  1、文科，2、理科，3、综合
     */
	private Integer majorType;


	private Integer roleId;

	private Integer tenantId;

    /**
     *
     */
	private Integer choiceYear;

	private String  courseGroup;

	private Integer courseGroupId;

	private Integer sex;

	private Integer scoreStart;

	private Integer scoreEnd;

	private Integer score;

	private String scoreId;

	private Integer rank;

    private Integer subjectFirst ;
    /*
    首选科目级别 从1到6代表，A+、A、B+、B、C、D
    */
    private Integer subjectFirstLevel ;
    /*
    次选科目 从化学、地理、政治、生物4选1
    物理	1
    化学	2
    政治	4
    地理	8
    历史	16
    生物	32
    信息技术	64
    */
    private Integer subjectSecond ;
    /*
    次选科目级别 从1到6代表，A+、A、B+、B、C、D
    */
    private Integer subjectSecondLevel ;

    private String valueGroup;

	/**
	 * 是否已经锁定分数
	 */
	private Integer isConfirmed;


	public Integer getIsConfirmed() {
		return isConfirmed;
	}

	public void setIsConfirmed(Integer isConfirmed) {
		this.isConfirmed = isConfirmed;
	}

	public Integer getTenantId() {
		return tenantId;
	}

	public void setTenantId(Integer tenantId) {
		this.tenantId = tenantId;
	}

	public String getComeFrom() {
		return comeFrom;
	}

	public void setComeFrom(String comeFrom) {
		this.comeFrom = comeFrom;
	}

	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	public CustomerInfo()
    {
    }

    /**会员id
    *@return
    */
    public String getCustomerId(){
	    return  customerId;
    }
    /**会员id
    *@param  customerId
    */
    public void setCustomerId(String customerId){
        this.customerId = customerId;
    }

    /**会员类型[0-内部员工 1-非内部员工]
    *@return
    */
    public String getCustomerType(){
	    return  customerType;
    }
    /**会员类型[0-内部员工 1-非内部员工]
    *@param  customerType
    */
    public void setCustomerType(String customerType){
        this.customerType = customerType;
    }

    /**注册类型 a、微信小程序， b、h5微信，c、手机号（短信码验证），d、手机唯一识别码（app）
    *@return
    */
    public String getRegType(){
	    return  regType;
    }
    /**注册类型 a、微信小程序， b、h5微信，c、手机号（短信码验证），d、手机唯一识别码（app）
    *@param  regType
    */
    public void setRegType(String regType){
        this.regType = regType;
    }

    /**appid 微信的appid
    *@return
    */
    public String getAppId(){
	    return  appId;
    }
    /**appid 微信的appid
    *@param  appId
    */
    public void setAppId(String appId){
        this.appId = appId;
    }

    /**来源id 微信注册时是unionid，手机时是手机号，app是是外部唯一识别码，比如imei
    *@return
    */
    public String getSourceId(){
	    return  sourceId;
    }
    /**来源id 微信注册时是unionid，手机时是手机号，app是是外部唯一识别码，比如imei
    *@param  sourceId
    */
    public void setSourceId(String sourceId){
        this.sourceId = sourceId;
    }

    /**来源子id 微信时时openid
    *@return
    */
    public String getSubSourceId(){
	    return  subSourceId;
    }
    /**来源子id 微信时时openid
    *@param  subSourceId
    */
    public void setSubSourceId(String subSourceId){
        this.subSourceId = subSourceId;
    }

    /**dict_business表关联,14、公开课，15、圣达信教育，16、志愿填报，17、自主招生，18、艺考生
    *@return
    */
    public Integer getModule(){
	    return  module;
    }
    /**dict_business表关联,14、公开课，15、圣达信教育，16、志愿填报，17、自主招生，18、艺考生
    *@param  module
    */
    public void setModule(Integer module){
        this.module = module;
    }

    /**来源渠道 miniprogram、自有微信小程序，h5、自有h5，gaosan、高三网app，h6、高三网h5引流
    *@return
    */
    public String getChannel(){
	    return  channel;
    }
    /**来源渠道 miniprogram、自有微信小程序，h5、自有h5，gaosan、高三网app，h6、高三网h5引流
    *@param  channel
    */
    public void setChannel(String channel){
        this.channel = channel;
    }

    /**会员等级
    *@return
    */
    public String getCustomerLevel(){
	    return  customerLevel;
    }
    /**会员等级
    *@param  customerLevel
    */
    public void setCustomerLevel(String customerLevel){
        this.customerLevel = customerLevel;
    }

    /**绑定手机号
    *@return
    */
    public String getPhone(){
	    return  phone;
    }
    /**绑定手机号
    *@param  phone
    */
    public void setPhone(String phone){
        this.phone = phone;
    }

    /**住址
    *@return
    */
    public String getAddress(){
	    return  address;
    }
    /**住址
    *@param  address
    */
    public void setAddress(String address){
        this.address = address;
    }


    public String getWxPicurl(){
	    return  wxPicurl;
    }
	public String getWxPicurlView(){
		return  wxPicurl;
	}
    public void setWxPicurl(String wxPicurl){
        this.wxPicurl = wxPicurl;
    }

    /**微信昵称
    *@return
    */
    public String getWxUname(){
	    return  wxUname;
    }
    /**微信昵称
    *@param  wxUname
    */
    public void setWxUname(String wxUname){
        this.wxUname = wxUname;
    }


    /**是否为老师[0-非老师 1-咨询师]
    *@return
    */
    public Integer getIsTeacher(){
	    return  isTeacher;
    }
    /**是否为老师[0-非老师 1-咨询师]
    *@param  isTeacher
    */
    public void setIsTeacher(Integer isTeacher){
        this.isTeacher = isTeacher;
    }

    /**可用标记 1、可用，0、不可用
    *@return
    */
    public Integer getCustStatus(){
	    return  custStatus;
    }
    /**可用标记 1、可用，0、不可用
    *@param  custStatus
    */
    public void setCustStatus(Integer custStatus){
        this.custStatus = custStatus;
    }

    /**注册时间
    *@return
    */
    public Date getRegisterTime(){
	    return  registerTime;
    }
    /**注册时间
    *@param  registerTime
    */
    public void setRegisterTime(Date registerTime){
        this.registerTime = registerTime;
    }

    /**更新人
    *@return
    */
    public Integer getUpdatedBy(){
	    return  updatedBy;
    }
    /**更新人
    *@param  updatedBy
    */
    public void setUpdatedBy(Integer updatedBy){
        this.updatedBy = updatedBy;
    }

    /**更新人名称
    *@return
    */
    public String getUpdatedName(){
	    return  updatedName;
    }
    /**更新人名称
    *@param  updatedName
    */
    public void setUpdatedName(String updatedName){
        this.updatedName = updatedName;
    }

    /**更新时间
    *@return
    */
    public Date getUpdatedTime(){
	    return  updatedTime;
    }
    /**更新时间
    *@param  updatedTime
    */
    public void setUpdatedTime(Date updatedTime){
        this.updatedTime = updatedTime;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    @ColumnIgnore
	private String moduleName;

	@ColumnIgnore
	private String channelName;

	public String getModuleName() {
		return moduleName;
	}

	public void setModuleName(String moduleName) {
		this.moduleName = moduleName;
	}

	public String getChannelName() {
		return channelName;
	}

	public void setChannelName(String channelName) {
		this.channelName = channelName;
	}

	@ColumnIgnore
	@JsonIgnore
	private String registerTimeQuery;
	@ColumnIgnore
	@JsonIgnore
	private Date registerTimeStart;
	@ColumnIgnore
	@JsonIgnore
	private Date registerTimeEnd;
	public String getRegisterTimeQuery(){
		return  registerTimeQuery;
	}
	public void setRegisterTimeQuery(String registerTimeQuery ){
		this.registerTimeQuery = registerTimeQuery;
		Date[] timePair = Utils.parseQueryTime(registerTimeQuery);
		if (timePair!=null && timePair[0]!=null) {
			this.registerTimeStart = timePair[0];
		}
		if (timePair!=null && timePair.length==2 && timePair[1]!=null) {
			this.registerTimeEnd = timePair[1];
		}

	}
	public Date getRegisterTimeStart(){
		return  registerTimeStart;
	}
	public void setRegisterTimeStart(Date registerTimeStart ){
		this.registerTimeStart = registerTimeStart;
	}
	public Date getRegisterTimeEnd(){
		return  registerTimeEnd;
	}
	public void setRegisterTimeEnd(Date registerTimeEnd ){
		this.registerTimeEnd = registerTimeEnd;
	}

    public String getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(String provinceId) {
        this.provinceId = provinceId;
    }

    public Integer getMajorType() {
        return majorType;
    }

    public void setMajorType(Integer majorType) {
        this.majorType = majorType;
    }

    public Integer getChoiceYear() {
        return choiceYear;
    }

    public void setChoiceYear(Integer choiceYear) {
        this.choiceYear = choiceYear;
    }

    public String getCourseGroup() {
        return courseGroup;
    }

    public void setCourseGroup(String courseGroup) {
        this.courseGroup = courseGroup;
    }

    public Integer getCourseGroupId() {
        return courseGroupId;
    }

    public void setCourseGroupId(Integer courseGroupId) {
        this.courseGroupId = courseGroupId;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Integer getScoreStart() {
        return scoreStart;
    }

    public void setScoreStart(Integer scoreStart) {
        this.scoreStart = scoreStart;
    }

    public Integer getScoreEnd() {
        return scoreEnd;
    }

    public void setScoreEnd(Integer scoreEnd) {
        this.scoreEnd = scoreEnd;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public String getScoreId() {
        return scoreId;
    }

    public void setScoreId(String scoreId) {
        this.scoreId = scoreId;
    }

    public Integer getRank() {
        return rank;
    }

    public void setRank(Integer rank) {
        this.rank = rank;
    }

    public Integer getSubjectFirst() {
        return subjectFirst;
    }

    public void setSubjectFirst(Integer subjectFirst) {
        this.subjectFirst = subjectFirst;
    }

    public Integer getSubjectFirstLevel() {
        return subjectFirstLevel;
    }

    public void setSubjectFirstLevel(Integer subjectFirstLevel) {
        this.subjectFirstLevel = subjectFirstLevel;
    }

    public Integer getSubjectSecond() {
        return subjectSecond;
    }

    public void setSubjectSecond(Integer subjectSecond) {
        this.subjectSecond = subjectSecond;
    }

    public Integer getSubjectSecondLevel() {
        return subjectSecondLevel;
    }

    public void setSubjectSecondLevel(Integer subjectSecondLevel) {
        this.subjectSecondLevel = subjectSecondLevel;
    }

    public String getValueGroup() {
        return valueGroup;
    }

    public void setValueGroup(String valueGroup) {
        this.valueGroup = valueGroup;
    }
}
